package com.heredata.hos.model;

import com.heredata.model.GenericResult;

public class UploadPartCopyResult extends GenericResult {

    private int partNumber;

    private String eTag;

    /**
     * Gets the part number.
     *
     * @return The part number.
     */
    public int getPartNumber() {
        return partNumber;
    }

    /**
     * Sets the part number.
     *
     * @param partNumber
     *            The part number.
     */
    public void setPartNumber(int partNumber) {
        this.partNumber = partNumber;
    }

    /**
     * Gets the ETag generated by HOS.
     * <p>
     * HOS would send the MD5 value of the parts data received to user in the
     * ETag header. To make sure the data transferred is 100% correct, we
     * strongly encouraged user to check the server side MD5 with the local
     * computed MD5 value.
     * </p>
     *
     * @return ETag value.
     */
    public String getETag() {
        return eTag;
    }

    /**
     * Sets the ETag value.
     * <p>
     * HOS would send the MD5 value of the parts data received to user in the
     * ETag header. To make sure the data transferred is 100% correct, we
     * strongly encouraged user to check the server side MD5 with the local
     * computed MD5 value.
     * </p>
     *
     * @param eTag
     *            ETag value.
     */
    public void setETag(String eTag) {
        this.eTag = eTag;
    }

    /**
     * Gets the part ETag.
     *
     * @return Gets the part ETag.
     */
    public PartETag getPartETag() {
        return new PartETag(partNumber, eTag);
    }
}
